<template>
	<view class="content">
		<view class="toubugud" :style="{background: albei}">
			<image class="fanhui" src="../../static/fanhui.png" @click="gofanhui"></image>
			<view class="xxzx">
				<image class="uimg" src="../../static/kefu.png" @click="gokefudh"></image>
				<view  @click="gotoPage('/pages/gouwuc/gouwuc')">
					<view class="tishi"></view>
					<image class="uimg" src="../../static/gouwuc.png"></image>
				</view>
			</view>
		</view>
		<swiper class="top-box" :indicator-dots="true" :autoplay="true" :interval="3000" :circular="true">
			<swiper-item v-for="item in lunbimg">
				<image class="img"  :src="item" mode="aspectFill"></image>
			</swiper-item>
		</swiper>
		<view class="daohang">
			<view class="zdhuanh">
				<view class="box-first-1">
					<view class="goods-price">
						<text class="goods-price-label">¥</text>19.9
					</view>
					<view class="goods-label">打折</view>
				</view>
				<view class="box-first-3">飘柔去屑洗发露  1500ml家庭装 年终优惠回馈老客户打折商品</view>
			</view>
		</view>
		<view class="cpchans">
			<view class="box-item">
				<view class="box-label">配送</view>
				<view class="box-value">
					南宁市高新区中盟科技园
					<image class="xiaotub" src="../../static/weiz.png"></image>
				</view>
				<image class="jinru" src="../../static/go.png"></image>
			</view>
			<view class="box-item">
				<view class="box-label">优惠</view>
				<view class="box-value">
					<view class="activity-label">满减</view>满1000立减100
				</view>
			</view>
			<view class="box-item">
				<view class="box-label">活动</view>
				<view class="box-value">
					<view class="activity-label">限时抢购</view>2021/01/12 - 2021/01/13
				</view>
			</view>
			<view class="box-item" @click="openParamsBox()">
				<view class="box-label">参数</view>
				<view class="box-value">
					品牌<text style="display: inline-block;width: 20rpx;"></text>型号...
				</view>
				<image class="jinru" src="../../static/go.png" mode=""></image>
			</view>
			<view class="box-footer">
				<image class="time-icon" src="../../static/checked-1.png"></image>付款7天内发货
			</view>
		</view>
		<view class="cpchans xiajg">
			<view class="title">
				<view class="title-left">商品评价（201）</view>
				<view class="title-right" @click="gotoPage('evaluate')">查看全部
					<image class="jinru" src="../../static/go.png" mode=""></image>
				</view>
			</view>
			<view class="evaluate-item">
				<view class="evaluate-header">
					<image class="evaluate-avatar" src="../../static/avatar.jpg"></image>
					<view class="header-body">
						<view class="header-title">匿名用户</view>
						<view class="header-time">21/05/14</view>
					</view>
				</view>
				<view class="evaluate-centent">
					包装完好无损，产品性能优越，携带方便，声音正常，动 力强劲，操作灵敏便捷，博世大品牌，质量信得过
				</view>
				<view class="evaluate-image-box">
					<image v-for="item in 3" mode="heightFix" class="evaluate-image"
						src="../../static/dengl.jpg"></image>
				</view>
			</view>
		</view>
		<!-- 购买栏 -->
		<view class="footer">
			<view class="footer-left">
				<view class="icon-item" @click="gotoPage('/pages/index/index')">
					<image mode="heightFix" class="icon-img" src="../../static/goods-icon-1.png"></image>
					<view class="icon-text">首页</view>
				</view>
				<view class="icon-item">
					<image mode="heightFix" class="icon-img" src="../../static/goods-icon-2.png"></image>
					<view class="icon-text">客服</view>
				</view>
				<view class="icon-item" @click="gotoPage('/pages/gouwuc/gouwuc')">
					<image mode="heightFix" class="icon-img" src="../../static/goods-icon-3.png"></image>
					<view class="icon-text">购物车</view>
				</view>
			</view>
			<view class="footer-right">
				<view class="jrgouwuc"  @click="openCartBox(1)">加入购物车</view>
				<view class="likegoum"  @click="opengoumai">立即购买</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				albei:'',
				lunbimg: [
					'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcos2.solepic.com%2FUploadImg%2Fimage%2F20200202%2F20200202134952_5047.jpg&refer=http%3A%2F%2Fcos2.solepic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643344668&t=b4bfe118e1c6348b551dcf7a335615e3',
					'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fp0.meituan.net%2Fdpdeal%2Fd023f4618baf3d73bc7e6027aad8b7ab54442.jpg&refer=http%3A%2F%2Fp0.meituan.net&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643344766&t=17eccc451091e4f76cc9c4a5c298eb79'
				],

			}
		},
		onLoad() {
			
		},
		// 监控屏幕滚动
		onPageScroll(e) {
			console.log(e.scrollTop);
			var zuob = 1;
			if(e.scrollTop>=100){
				zuob = 100;
			}else{
				zuob = e.scrollTop;
			}
			this.albei = 'rgba(255,255,255, ' + (zuob*0.01) + ')';
		},
		methods: {
			// 拔打客服电话
			gokefudh(){
				uni.makePhoneCall({
					phoneNumber:'15978194868'
				})
			},
			// 返回
			gofanhui(){
				wx.navigateBack({
					delta:1
				})
			},
			// 跳转
			gotoPage(url){
				uni.navigateTo({
					url:url
				})
			},
			// 购买
			opengoumai(){
				uni.navigateTo({
					url:'../tijaodd/tijaodd'
				})
			}
		}
	}
</script>
<style>
	page{
		background: #f0f0f0;
	}
</style>
<style lang="scss" scoped>
	.content {
		display: flex;
		flex-direction: column;
		.toubugud{
			position: fixed;
			width: 750rpx;
			padding: 30rpx 0 10rpx 0 ;
			top: 0;
			z-index: 999;
			display: flex;
			justify-content: space-between;
			align-items: center;
			.fanhui{
				width: 50rpx;
				height: 50rpx;
			}
			.xxzx{
				width: 130rpx;
				height: 80rpx;
				border-radius: 40rpx;
				margin-right: 30rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 0 20rpx;
				background-color: rgba($color: #000000, $alpha: 0.8);
				.tishi{
					width: 20rpx;
					height: 20rpx;
					background-color: #ff0000;
					border-radius: 10rpx;
					position: absolute;
					z-index: 11;
					margin-left: 35rpx;
				}
				.uimg{
					width: 55rpx;
					height: 55rpx;
				}
			}
		}
		// 轮播图
		.top-box{
			width: 750rpx;
			height: 800rpx;
			/deep/ .uni-swiper-dots {
				// 指示点整个区域的位置
				bottom: 80rpx;
				left: 60rpx;
			}
	
			/deep/ .uni-swiper-dot {
				// 指示点元素默认样式
				width: 9upx !important;
				height: 9upx !important;
				background: #C0C0C0 !important;
			}
	
			/deep/ .uni-swiper-dot-active {
				// 指示点元素激活（当前选中）状态样式
				width: 32upx !important;
				height: 8upx !important;
				background: #ff007f !important;
				border-radius: 4rpx;
			}
			
			.img{
				width: 750rpx;
				height: 800rpx;
			}
		}
		// 菜单
		.daohang{
			width: 750rpx;
			// height: 100rpx;
			padding-top: 20rpx;
			border-radius: 30rpx 30rpx 0 0;
			margin-top: -50rpx;
			z-index: 99;
			background-color: #f0f0f0;
			// display: flex;
			// align-items: center;
			// justify-content: center;
			// flex-wrap: wrap;
			// overflow: hidden;
			// position: relative;
			.zdhuanh{
				// display: flex;
				width: 670rpx;
				justify-content: space-between;
				padding: 20rpx;
				margin: 20rpx;
				background: #ffffff;
				border-radius: 20rpx;
				.box-first-1 {
					display: flex;
					align-items: center;
					.goods-price {
						font-size: 44rpx;
						font-weight: bold;
						color: #ff007f;
						.goods-price-label {
							font-size: 0.7em;
						}
					}
				
					.goods-label {
						display: inline-block;
						height: 34rpx;
						line-height: 34rpx;
						padding: 0 15rpx;
						border-radius: 17rpx;
						color: #ffffff;
						font-size: 22rpx;
						margin-left: 18rpx;
						background: #ff007f;
					}
				}
			}
		}
		
		.cpchans{
			width: 670rpx;
			background: #ffffff;
			margin: 0 20rpx 20rpx 20rpx;
			padding: 20rpx;
			border-radius: 20rpx;
			.evaluate-item {
				margin-top: 30rpx;
				.evaluate-header {
					display: flex;
					margin-bottom: 10rpx;
					.evaluate-avatar {
						width: 68rpx;
						height: 68rpx;
						border-radius: 50%;
					}
			
					.header-body {
						height: 68rpx;
						padding-left: 22rpx;
						display: flex;
						flex-direction: column;
						justify-content: space-between;
			
						.header-title {
							font-size: 26rpx;
							color: #222222;
						}
			
						.header-time {
							font-size: 22rpx;
							color: #919191;
						}
					}
				}
			
				.evaluate-rate {
					padding: 20rpx 0;
				}
			
				.evaluate-centent {
					font-size: 26rpx;
					color: #222;
					line-height: 1.5;
				}
			
				.evaluate-image-box {
					padding: 29rpx 0;
					margin-right: -10rpx;
			
					.evaluate-image {
						height: 212rpx;
						margin-right: 10rpx;
						margin-bottom: 10rpx;
					}
				}
			}
			.title {
				display: flex;
				justify-content: space-between;
			
				.title-left {
					color: #222222;
					font-size: 30rpx;
					font-weight: bold;
				}
			
				.title-right {
					display: flex;
					align-items: center;
					color: #B2B2B2;
					font-size: 24rpx;
					.jinru{
						width: 40rpx;
						height: 40rpx;
					}
				}
			}
			.box-footer {
				background-color: #fafafa;
				height: 64rpx;
				display: flex;
				align-items: center;
				color: #919191;
				font-size: 22rpx;
				margin-top: 20rpx;
			
				.time-icon {
					width: 23rpx;
					height: 23rpx;
					margin-right: 10rpx;
				}
			}
			.box-item {
				display: flex;
				align-items: center;
				// justify-content: space-between;
				color: #222222;
				font-size: 24rpx;
				padding: 21rpx 0;
				position: relative;
			
				.box-label {
					font-weight: bold;
					width: 100rpx;
				}
			
				.box-value {
					color: #222;
					display: flex;
					align-items: center;
					width: 550rpx;
					.xiaotub{
						width: 30rpx;
						height: 30rpx;
					}
					.activity-label {
						display: inline-block;
						padding: 2rpx 10rpx;
						background-color:rgba($color: #ff007f, $alpha: 0.1);
						color: #ff007f;
						font-size: 22rpx;
						margin-right: 40rpx;
					}
				}
				.jinru{
					width: 40rpx;
					height: 40rpx;
				}
			}
			
		}
		.xiajg{
			margin-bottom: 120rpx;
		}
		.footer {
			width: 700rpx;
			height: 100rpx;
			position: fixed;
			left: 0;
			bottom: 0;
			display: flex;
			justify-content: space-between;
			background-color: #fff;
			align-items: center;
			padding: 0 25rpx;
		
			.footer-left {
				width: 260rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
			}
		
			.icon-item {
				// width: 60rpx;
				text-align: center;
		
				.icon-img {
					height: 34rpx;
				}
		
				.icon-text {
					font-size: 22rpx;
					color: #333333;
					transform: scale(0.8);
					// transform: scale(0.8);
					// margin-top: -5rpx;
				}
			}
		
			.footer-right {
				width: 420rpx;
				display: flex;
				justify-content: space-between;
				.jrgouwuc{
					width: 200rpx;
					height: 70rpx;
					display: flex;
					justify-content: center;
					align-items: center;
					background: #ffaa00;
					color: #ffffff;
					border-radius: 35rpx;
					line-height: 70rpx;
					font-size: 28rpx !important;
					font-weight: bold !important;
				}
				.likegoum{
					display: flex;
					justify-content: center;
					align-items: center;
					width: 200rpx;
					height: 70rpx;
					border-radius: 35rpx;
					line-height: 70rpx;
					font-size: 28rpx !important;
					font-weight: bold !important;
					background: #ff007f;
					color: #ffffff;
				}
			}
		}
	}
	
</style>
